FROM  centos

MAINTAINER 2018-05-06 tangyubin tang-yu-bin@qq.com
RUN  yum -y install gcc*  make pcre-devel zlib-devel vim git
ADD nginx-1.6.0.tar.gz  /usr/src/
WORKDIR /usr/src/nginx-1.6.0/
RUN useradd -s /sbin/nologin -M nginx
RUN ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module && make && make install
RUN ln -s /usr/local/nginx/sbin/* /usr/local/sbin/
EXPOSE 5050
WORKDIR /
COPY nginx.conf /usr/local/nginx/conf/nginx.conf
RUN nginx
CMD ["nginx", "-g", "daemon off;"]